package com.py.custom.ability.kafka.producer;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 配置信息
 */
@Component
@ConfigurationProperties(prefix = CKafkaProducerProperties.PREFIX)
public class CKafkaProducerProperties {

    public static final String PREFIX = "custom.ckafka.producer";

    /**
     * 生产者bean的名称
     */
    private String producerName;

    /**
     * 集群地址
     */
    private String brokerServers;

    /**
     * 消息主题
     */
    private String topicName;

    /**
     * 是否开启事务
     */
    private Boolean hasTransaction;

    public String getProducerName() {
        return producerName;
    }

    public void setProducerName(String producerName) {
        this.producerName = producerName;
    }

    public String getBrokerServers() {
        return brokerServers;
    }

    public void setBrokerServers(String brokerServers) {
        this.brokerServers = brokerServers;
    }

    public String getTopicName() {
        return topicName;
    }

    public void setTopicName(String topicName) {
        this.topicName = topicName;
    }

    public Boolean getHasTransaction() {
        return hasTransaction;
    }

    public void setHasTransaction(Boolean hasTransaction) {
        this.hasTransaction = hasTransaction;
    }
}
